import { ISSUE_STATE } from "@/grpc/types";

export const issueState = {
    [ISSUE_STATE.ISSUE_STATE_PLAN]: {
        label: '规划中',
        value: ISSUE_STATE.ISSUE_STATE_PLAN,
    },
    [ISSUE_STATE.ISSUE_STATE_PROCESS]: {
        label: '处理',
        value: ISSUE_STATE.ISSUE_STATE_PROCESS,
    },
    [ISSUE_STATE.ISSUE_STATE_CHECK]: {
        label: '验收',
        value: ISSUE_STATE.ISSUE_STATE_CHECK,
    },
    [ISSUE_STATE.ISSUE_STATE_CLOSE]: {
        label: '关闭',
        value: ISSUE_STATE.ISSUE_STATE_CLOSE,
    },
};

export function getStateColor(v: number) {
    switch (v) {
        case ISSUE_STATE.ISSUE_STATE_PLAN:
            return '72 201 118';
        case ISSUE_STATE.ISSUE_STATE_PROCESS:
            return '83 165 255';
        case ISSUE_STATE.ISSUE_STATE_CHECK:
            return '247 136 91';
        case ISSUE_STATE.ISSUE_STATE_CLOSE:
            return '196 196 196';
        default:
            return '72 201 118';
    }
};